var express = require('express');
var router = express.Router();

var proxy = require('http-proxy-middleware');

/* GET home page. */
router.get('/', function(req, res, next) {
    res.redirect('/marketconditions/login.html');
});
//login page
router.get('/login', function(req, res, next) {
    res.redirect('/marketconditions/login.html');
});


//reg page
router.get('/reg', function(req, res, next) {
    res.redirect('/marketconditions/reg.html');
});


//forget page
router.get('/forget', function(req, res, next) {
    res.redirect('/marketconditions/forget.html');
});

//server转接到java
router.all('/*',  proxy({
    target: 'http://qbmf.trenddata.cn',
    changeOrigin: true
}));


module.exports = router;
